package com.example.duanlei417.mypro2.login;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

import com.example.duanlei417.mypro2.R;
import com.example.duanlei417.mypro2.login.utils.SharePreferenceUtil;

/**
 * 登录activity
 */
public class LoginActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
    }


    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_login:
                SharePreferenceUtil.setBooleanSp(SharePreferenceUtil.IS_LOGIN, true, this);
                Toast.makeText(this, "登录成功", Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
